# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=tcpwatch
pkgver=1.3.1
pkgrel=6
pkgdesc='A utility written in Python that lets you monitor forwarded TCP connections or HTTP proxy connections.'
groups=('blackarch' 'blackarch-networking')
arch=('any')
url='http://hathawaymix.org/Software/TCPWatch'
license=('ZPL')
depends=('python2' 'python2-setuptools')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/a9/0a/7c5edad180ad0bcee614641aec5b1e7fda8d19ccc01e4cc4e7c2bc8bb6a3/$pkgname-$pkgver.tar.gz"
        'LICENSE')
sha512sums=('aefaf08dd726f604aa17207893d8942fba4d410165dbf1be4a706fa42fc21a7c6b7fa6250b584c6d26c2a2ca577d5dab502fa2a7b8c00f0c09f94736913bfaf7'
            '541777a015eb17bfd2dc07f5fb3a9aba950ded5bd0f53a80c52d6f4e2cb85a28a94294dbba1ca54560d0f3aadd749c94a31d67d76c1e4e6fd2255056415d52c7')

package() {
	cd "$pkgname-$pkgver"

	python2 setup.py install --root="$pkgdir" --prefix=/usr -O1

  install -Dm 644 "$srcdir/LICENSE" \
    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  sed -i 's|python|python2|' \
    "$pkgdir/usr/lib/python2.7/site-packages/$pkgname.py"
}

